{literal}
<h2>Serializing DomAr objects</h2>
<pre class="code">
&lt;?php
$a = new SomeObject();
$a->name = 'aa';
// serialize
$serialized = $a->serialize();
// $a is now unusable as it is in serialized state. Do not use it!

// unserialize
$aBack = $a->unserialize();

// Notice that it still returns same instance of object.
$a->name = 'bb';
echo $a->name.' == '.$aBack->name; // echoes "bb == bb"

?&gt;
</pre>

<h2>Global object</h2>
This is cache logic that single object will always be saved into file and you wont have to load it from database.
<pre class="code">
&lt;?php
class MyObject extends DomArGlobalObject {

}
?&gt;
</pre>
When script ends global object will be saved into file. If this file exists each client will load object from that file, not from database.<br>
If object is modified and saved then cache will be recreated.<br>
{/literal}